package com.oceanread.cn;

import com.oceanread.cn.config.MyConfig;
import com.sun.org.apache.bcel.internal.generic.NEW;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author konglingxuan
 * @date 2021/11/1
 */
@SpringBootApplication
public class TestApplication {
    public static void main(String[] args) {
        SpringApplication.run(TestApplication.class,args);

        Properties properties= new Properties();
        InputStream inputStream=null;
        try {
            properties.load(new FileInputStream("res/MyConfig.properties"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        MyConfig.setFilepath(properties.getProperty("filpath"));
        System.out.println(MyConfig.getFilepath());

    }
}
